<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");

$title = trim($_POST['bologTitle']);
$abstract = trim($_POST['abstract']);
$content = trim($_POST['content']);
$issueTime= date("Y-m-d H:i:s");

    $db = new mysql_db();
    $ins_blog="insert into blog(title,abstract,content,author,familyNum,issueTime) values('".$title."','".$abstract."','".$content."','".$_SESSION['user_n_current']."','".$_SESSION['family_current']."','".$issueTime."')";
    $issueBl_res=$db->query($ins_blog);
     if($issueBl_res<=0){
         echo ($db->createJson(false,"","system error"));
     }
     else{
            echo($db->createJson(true,"",""));
     }
?>